import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriver;

import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;

import java.time.Duration;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-04-11
 * Time: 8:18
 */
public class AutoUtil {
    static WebDriver webDriver;

    @BeforeAll
    public static void init() {
        EdgeOptions options = new EdgeOptions();
        options.addArguments("--remote-allow-origins=*");
        webDriver = new EdgeDriver(options);
    }

    @AfterAll
    public static void shutDown() {
        webDriver.quit();
    }

//    @Test
//    public void fun() {
//        EdgeOptions options = new EdgeOptions();
//        options.addArguments("--remote-allow-origins=*");
//
//        // 设置浏览器参数为无头模式 , 需要在设置浏览器驱动之前
//        WebDriver driver = new EdgeDriver(options);
//        webDriver.get("http://127.0.0.1:11111/login3.html");
//    }
}
